﻿@model DanceIntegration.Models.SectionListViewModel

@if (Model.Sections.Any())
{
    <ul>
        @foreach (var node in Model.Sections)
        {
            if (node.PrevSectionID == Model.Seed)
            {
                <a>@node.Name</a>
                DanceIntegration.Models.SectionListViewModel inner = new DanceIntegration.Models.SectionListViewModel
                {
                    Seed = node.ID,
                    Sections = Model.Sections
                };
                @Html.Partial("_TreeViewSection", inner)
            }
        }
    </ul>
}
